import { ref } from 'vue'
import pageContent from '@/components/page-content/page-content.vue'

function usePageContent() {
  const pageContentRef = ref<InstanceType<typeof pageContent>>()
  function queryClick(searchForm: any) {
    pageContentRef.value?.fetchPageListData(searchForm)
  }
  function resetClick() {
    pageContentRef.value?.fetchPageListData()
  }

  return {
    pageContentRef,
    queryClick,
    resetClick
  }
}

export default usePageContent
